//
//  KZListen&SpeakVocabularyImporveVC.m
//  听说弱点强化训练
//
//  Created by 朱凯 on 2018/8/22.
//  Copyright © 2018年 盛超. All rights reserved.
//

#import "KZListenSpeakVocabularyImporveVC.h"

// vc
#import "KZVocabularyImproveMakeTestVC.h"

// view
#import "KZRandomDistributionView.h"        // 随机分布视图
#import "KZShadowButton.h"                  // 阴影按钮

// api
#import "KZVocabularyImproveNetApi.h"

@interface KZListenSpeakVocabularyImporveVC ()
{
    KZRandomDistributionView *disView;
}
@end

@implementation KZListenSpeakVocabularyImporveVC

- (void)viewDidLoad {
    [super viewDidLoad];

    disView = [KZRandomDistributionView new];
    [self.view addSubview:disView];
    [disView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.top.equalTo(@0);
        make.width.equalTo(self.view);
        make.height.equalTo(@300);
    }];
    disView.vocabularys = @[@"", @"", @"", @"" ,@"", @"", @"", @"", @"", @"", @"" ,@""];
    
    
    KZShadowButton *button = [[KZShadowButton alloc] init:^(UIButton *button) {
        [button setTitle:@"下一题" forState:UIControlStateNormal];
        button.backgroundColor = [UIColor colorWithR:80 g:172 b:245 a:1];
    }];
    [self.view addSubview:button];
    [button mas_makeConstraints:^(MASConstraintMaker *make) {
        make.width.equalTo(@160);
        make.height.equalTo(@40);
        make.centerX.equalTo(@0);
        make.top.equalTo(disView.mas_bottom).offset(20);
    }];

}
- (void)viewWillAppear:(BOOL)animated {
    
    [super viewWillAppear:animated];
    [self setNaviAttributeWithTranslucent:true stateBarLightContent:true];
}

- (void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event {
//    disView.vocabularys = @[@"", @"", @"", @"" ,@"", @"", @"", @"", @"", @"", @"" ,@""];

    KZVocabularyImproveNetApi *api = [KZVocabularyImproveNetApi new];
    api.requestParam = @{@"token":DR_UserInfo.Token};

    [api getUnfamiliarVocabularyPackage:^{
        
    } failuer:^(NSString *error) {
        
    }];
    
    [self push:[KZVocabularyImproveMakeTestVC new]];
}


@end
